package cn.hchaojie.camp.day11;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;

import org.junit.Test;

public class DemoWriter {
	@Test
	public void testWriter() {
		try (
				OutputStreamWriter writer = new OutputStreamWriter(new FileOutputStream("a.txt"), "utf-8");
				) {
			writer.write('中');
			
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
